/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-04-01
 * Time: 20:01
 */
public class Student {
    //
    public String name;
    public Integer age;
    //
    public Student(){
        System.out.println("无参数public构造方法");
    }
    //
    private Student(String name,int age){
        System.out.println("有参数private构造方法");
        this.name = name;
        this.age = age;
    }
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
    //
    private void function(int age){
        System.out.println(age);
    }
}